include<tools/util.scad>
$fn=100;

main();
//link_pipe();
//qia();
//gai();

module main(){
    difference(){
        cylinder(h=67,d=57);
        //cylinder(h=68,d=51);
        cylinder(h=68,d=48);
     /*   
       cylinder(h=22,d=56.5);
        cylinder(h=23,d=50.5);
       */
        jieti_mask();
        kako_mask();
        rotate([0,0,180]) kako_mask();
    }

    translate([0,0,67]) jietou();
    //translate([-70,0,0]) jietou();

}

module jieti_mask(){
      difference(){
        union(){
        cylinder(h=10,d=52.5);
        //translate([0,0,10]) cylinder(h=5,d=51.5);
        translate([0,0,10]) cylinder(h=5,d=50);
        }
        //cylinder(h=20,d=50.5);
        cylinder(h=20,d=48);
        
    }
}
module kako_mask(){
    difference(){
        d_arc_cylinder(radius=27, height=6.7, angle=52);
        //cylinder(h=6.7,d=54);
        d_arc_cylinder(radius=25.25, height=7, angle=52);
        //cylinder(h=7,d=50.5);
        translate([15,7,0]) rotate([0,0,40])  cube([15,10,5]);
    }
}
module jietou(){
    difference(){
        sphere(28.5);
        //sphere(25.5);//d=51
        sphere(24);//d=48
        translate([0,0,-14.25])cube([60,60,28.5],center=true);
        translate([0,0,20]) cylinder(h=20,d=24.5,center=true);
    }
}

module link_pipe(){
    //连接筒
        translate([50,0,0]){
            difference(){
                cylinder(h=20,d1=25.5,d2=24);
                cylinder(h=20.5,d1=22,d2=20.5);
            }
            translate([11,0,20])cylinder(h=5,d=1.5);
        }
}

module qia(){
    //防尘罩卡口
    translate([90,0,0])difference(){
        cylinder(h=7,d=3);
        cylinder(h=7,d=1.55);
        translate([0,-0.5,0])cube([3,1,7]);
        translate([0,-1.5,5])cube([1.5,3,2]);
    }
}

module gai(){
    //防尘盖
    translate([90,40,0])difference(){
        union(){
            cylinder(d=21,h=1);
            translate([0,10,0])cylinder(d=5,h=0.5);


        }
           translate([0,10.5,0]) cylinder(d=2.5,h=0.6);

        translate([-15,-8,0.5])cube([30,30,1]);
    }
}

